// Copyright 2011 Jefferson Willian
// willmont7@gmail.com

#include <cstdio>
#include <cmath>

int main() {
  int n;
  int games = 1;

  while (scanf("%d", &n) && n != -1)
    printf("Teste %d\n%d\n\n", games++, static_cast<int>(pow(pow(2, n)+1, 2)));

  return 0;
}
